package routers

import (
	"ginProject/controller/admin"
	"github.com/gin-gonic/gin"
)

func AdminRouters(router *gin.Engine) {
	adminRouter := router.Group("/admin")
	{
		userController := &admin.UserController{} // 使用指针
		newsController := &admin.NewsController{} // 使用指针

		adminRouter.GET("/user", userController.Index)
		adminRouter.GET("/user/add", userController.Add)
		adminRouter.GET("/news", newsController.GetNews)
	}
}
